CREATE TABLE [dbo].[Contact]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[MemberId] [int] NOT NULL,
[TypeId] [int] NOT NULL,
[Value] [nvarchar] (50) COLLATE Arabic_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Contact] ADD CONSTRAINT [PK_memberContacts] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Contact] ADD CONSTRAINT [FK_memberContacts_member] FOREIGN KEY ([MemberId]) REFERENCES [dbo].[Member] ([Id])
GO
ALTER TABLE [dbo].[Contact] ADD CONSTRAINT [FK_memberContacts_contactType] FOREIGN KEY ([TypeId]) REFERENCES [dbo].[ContactType] ([Id]) ON DELETE CASCADE
GO
